<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../common/taglibs.jsp"%>
<%@include file="../../common/_head.jsp"%>
<html>
<head>
    <title>应用版本列表</title>
</head>
<body pname="<%=basePath%>">
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <table class="layui-hide" id="data-table" lay-filter="data-table"></table>

                    <script type="text/html" id="data-table-toolbar">
                        <div class="layui">
                            <div class="layui-condition">
                                <label>类型：</label>
                                <div class="layui-inline" style="width: 160px;">
                                    <select id="type">
                                        <option value="">全部</option>
                                        <option value="0">Android</option>
                                        <option value="1">IOS(TF)</option>
                                        <option value="2">IOS(APPSTORE)</option>
                                        <option value="3">IOS(ENTER)</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>时间：</label>
                                <div class="layui-inline" style="width: 180px;">
                                    <input type="text" class="layui-input" id="time" placeholder=" - " autocomplete="off">
                                </div>
                            </div>
                            <div class="layui-condition">
                                <button type="button" class="layui-btn" id="search" lay-event="search">
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>

                            <div style="float: right">
                                <c:forEach items="${userPermissions}" var="permission">
                                    <c:if test="${permission eq '/version/add'}">
                                        <button class="layui-btn layui-btn-sm" lay-event="add">新增</button>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                    </script>

                    <script type="text/html" id="data-table-bar">
                        <c:forEach items="${userPermissions}" var="permission">
                            <c:if test="${permission eq '/version/updateStatus'}">
                                <a class="layui-btn layui-btn-xs" lay-event="updateStatus">
                                    {{# if(d.status == 0){ }}
                                        禁用
                                    {{# }else{ }}
                                        启用
                                    {{# } }}
                                </a>
                            </c:if>
                            <c:if test="${permission eq '/version/edit'}">
                                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                            </c:if>
                        </c:forEach>
                    </script>

                    <script type="text/html" id="typeTpl">
                        {{# if(d.type == 0){ }}
                            Android
                        {{# }else if(d.type == 1){ }}
                            IOS(TF)
                        {{# }else if(d.type == 2){ }}
                            IOS(APPSTORE)
                        {{# }else if(d.type == 3){ }}
                            IOS(ENTER)
                        {{# } }}
                    </script>
                    <script type="text/html" id="urlTpl">
                        {{# if(d.url != null && d.url != ''){ }}
                            <a href="{{ ossDomain }}/{{ d.url }}">{{ ossDomain }}/{{ d.url }}</a>
                        {{# } }}
                    </script>
                    <script type="text/html" id="mustTpl">
                        {{# if(d.must == 0){ }}
                            否
                        {{# }else{ }}
                            是
                        {{# } }}
                    </script>
                    <script type="text/html" id="statusTpl">
                        {{# if(d.status == 0){ }}
                            启用
                        {{# }else{ }}
                            禁用
                        {{# } }}
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="<%=path%>/js/materialmanage/version/list.js?v=1.1.2"></script>
</body>
</html>
